package com.moli.iov.admin.service.impl;

import com.moli.iov.admin.service.SysParamSettingsService;
import com.moli.iov.base.model.dto.req.SysParamSettingsQueryReqDto;
import com.moli.iov.base.model.dto.req.SysParamSettingsReqDto;
import com.moli.iov.base.model.dto.res.SysParamSettingsResDto;
import com.moli.iov.base.remote.ISysParamSettingsRemoteService;
import com.moli.iov.model.dto.req.PageExtend;
import com.moli.iov.rest.RestResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * The type Sys param settings service.
 *
 * @author wanghualin
 * @date 2019 -10-08 20:42:57
 */
@Service
@Slf4j
public class SysParamSettingsServiceImpl implements SysParamSettingsService {

  @Reference(group = "${service.group}", check = false)
  private ISysParamSettingsRemoteService settingsRemoteService;

  @Override
  public RestResponse<PageExtend<SysParamSettingsResDto>> listSysParamSettings(
          SysParamSettingsQueryReqDto dto) {
    return RestResponse.success(settingsRemoteService.listSysParamSettings(dto));
  }

  @Override
  public RestResponse updateSysParamSettings(SysParamSettingsReqDto dto) {
    return settingsRemoteService.updateSysParamSettings(dto);
  }


  @Override
  public RestResponse initSysParamSettings(SysParamSettingsReqDto userDto) {
    return settingsRemoteService.initSysParamSettings(userDto);
  }
}
